<?php

namespace App\Controller\InsideService;

class ToolsInside extends BaseInside {

    /**
     * 清空用户头像
     * @param $game_hash
     * @param $openid
     * @return array
     */
    public function userAvatar($game_hash, $openid): array {
        return $this->postInfo('Tools/userAvatar', [
            'openid'    => $openid,
            'game_hash' => $game_hash
        ]);
    }

    /**
     * 重置角色技能
     * @param $game_hash
     * @param $openid
     * @param $hero_id
     * @return array
     */
    public function roleSkill($game_hash, $openid, $hero_id): array {
        return $this->postInfo('Tools/roleSkill', [
            'hero_id'   => $hero_id,
            'openid'    => $openid,
            'game_hash' => $game_hash
        ]);
    }

    /**
     * 设置停服
     * @param $game_hash
     * @param $time
     * @param $endTime
     * @param $content
     * @return array
     */
    public function closeServer($game_hash, $time, $endTime, $content): array {
        return $this->postInfo('Tools/closeServer', [
            'start_time' => $time,
            'end_time'   => $endTime,
            'game_hash'  => $game_hash,
            'content'    => $content
        ]);
    }

    /**
     * 获取用户角色存档
     * @param $data
     * @return array
     */
    public function roleLastDungeon($data): array {
        return $this->postInfo('Tools/roleLastDungeon', $data);
    }

    /**
     * 获取用户唯一标识
     * @param $game_hash
     * @param $openid
     * @param $hero_id
     * @return array
     */
    public function getRoleUnique($game_hash, $openid, $hero_id): array {
        return $this->postInfo('Tools/getRoleUnique', [
            'hero_id'   => $hero_id,
            'openid'    => $openid,
            'game_hash' => $game_hash
        ]);
    }

    /**
     * 清除用户战令领取记录
     * @param $game_hash
     * @param $openid
     * @param $hero_id
     * @return array
     */
    public function clearRoleWarOrder($game_hash, $openid, $hero_id): array {
        return $this->postInfo('Tools/clearRoleWarOrder', [
            'hero_id'   => $hero_id,
            'openid'    => $openid,
            'game_hash' => $game_hash
        ]);
    }

    /**
     * 生成指定词条装备
     * @param $game_hash
     * @param $openid
     * @param $hero_id
     * @param $item_id
     * @param $extra_effect_id
     * @return array
     */
    public function createEquipment($game_hash, $openid, $hero_id, $item_id, $extra_effect_id, $is_abyss, $abyss_effect_id): array {
        return $this->postInfo('Tools/createEquipment', [
            'hero_id'         => $hero_id,
            'openid'          => $openid,
            'game_hash'       => $game_hash,
            'item_id'         => $item_id,
            'extra_effect_id' => $extra_effect_id,
            'is_abyss'        => $is_abyss,
            'abyss_effect_id' => $abyss_effect_id
        ]);
    }

    /**
     * 清除用户战令领取记录
     * @param $game_hash
     * @param $openid
     * @param $hero_id
     * @param $gear
     * @param $date
     * @return array
     */
    public function dailyRecharge($game_hash, $openid, $hero_id, $gear, $date): array {
        return $this->postInfo('Tools/dailyRecharge', [
            'hero_id'   => $hero_id,
            'openid'    => $openid,
            'game_hash' => $game_hash,
            'gear'      => $gear,
            'date'      => $date
        ]);
    }
}